#pragma once
#include "interfaces/InputOutputPlugin.h"

class CGALMesh : public Model{
    Q_OBJECT
    
public:
    CGALMesh(QString path, QString name=QString()) : Model(path,name){}
    void updateBoundingBox(){
        bbox.setExtents(QVector3D(-1,-1,-1), QVector3D(+1,+1,+1));
    }
};

class cgalmesh_io_off : public InputOutputPlugin{
    Q_OBJECT
    Q_INTERFACES(InputOutputPlugin)

public:
    QString name(){ return "[CGALMesh] Object File Format (*.off)"; }
    Model* open(const QString& path){
        throw StarlabException("cgalmesh_io_off::open() not implemented");
        return new CGALMesh(path,"Dummy CGALMesh");
    }
    bool isApplicable(Model* model){ 
        return qobject_cast<CGALMesh*>(model); 
    }
};
